]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
searchDisplay: Scroll results when the user focuses a provider icon
authorJasper St. Pierre <jstpierre@mecheye.net>
Thu, 26 Sep 2013 19:16:45 +0000 (15:16 -0400)
committerJasper St. Pierre <jstpierre@mecheye.net>
Thu, 26 Sep 2013 19:17:29 +0000 (15:17 -0400)
Otherwise, it seems odd to highlight results the user can't see
simply by pressing down a lot.

https://bugzilla.gnome.org/show_bug.cgi?id=708868

js/ui/searchDisplay.js

index 72aa131942bd81fc266943cef2e7e82bb48134a9..69c79a1af674e369ca1709525fed340afed25158 100644 (file)
@@ -214,8 +214,8 @@ const SearchResultsBase = new Lang.Class({
         this.actor.hide();
     },
 
-    _keyFocusIn: function(icon) {
-        this.emit('key-focus-in', icon);
+    _keyFocusIn: function(actor) {
+        this.emit('key-focus-in', actor);
     },
 
     _setMoreIconVisible: function(visible) {
@@ -259,6 +259,7 @@ const ListSearchResults = new Lang.Class({
 
         this._container = new St.BoxLayout({ style_class: 'search-section-content' });
         this.providerIcon = new ProviderIcon(provider);
+        this.providerIcon.connect('key-focus-in', Lang.bind(this, this._keyFocusIn));
         this.providerIcon.connect('clicked', Lang.bind(this,
             function() {
                 provider.launchSearch(this._terms);
@@ -404,8 +405,8 @@ const SearchResults = new Lang.Class({
         return false;
     },
 
-    _keyFocusIn: function(provider, icon) {
-        Util.ensureActorVisibleInScrollView(this._scrollView, icon);
+    _keyFocusIn: function(provider, actor) {
+        Util.ensureActorVisibleInScrollView(this._scrollView, actor);
     },
 
     createProviderDisplay: function(provider) {